package com.ej.demo.action;

import com.ej.demo.page.FlightListingPage;

public class FlightListingPageAction {

	FlightListingPage flightListingPage;

	public FlightListingPageAction() {
		flightListingPage = new FlightListingPage();
	}

	public void verifyFlightListing() {
		flightListingPage.verifyFlightListing();
	}

	public FlightListingPageAction selectOnwardJourneyFlight(String onwardFlight) {
		flightListingPage.selectOnwardJourneyFlight(onwardFlight);
		return this;
	}

	public FlightListingPageAction selectReturnJourneyFlight(String returnFlight) {
		flightListingPage.selectReturnJourneyFlight(returnFlight);
		return this;
	}

	public void verifyFlightSelection() {
		flightListingPage.verifyFlightSelection();
	}

	public FlightOptionsPageAction navigateToFlightOptionPage() {
		flightListingPage.navigateToFlightOptionPage();
		return new FlightOptionsPageAction();
	}
}
